Home | | Latest | About | Random
# Week 1 Thursday.
## The story so far.
- We've been focusing on first-order ODEs.
- Methods that we have developed so far to find solutions $y=y(x)$:
- Separable: $y'=A(x)B(y)$, then set up $dy / B(y) = A(x) dx$
- Linear: $y' + P(x) y = Q(x)$, then $y(x) = \frac{1}{\mu} [\int \mu Qdx + C ]$ with $\mu(x) = e^{\int P dx}$.
- Constructing Picard iterates as approximations of a solution to an IVP.s
- Theorems that say something about solutions to an IVP:
- Peano's existence theorem
- Picard's existence and uniqueness theorem
## 1-parameter family of curves on the plane.
- Take any 2-variable scalar-valued function $\phi(x,y)$, by setting $\phi(x,y)$ equal to various constants we can get various curves. So this the set $$
{\cal F}=\{\phi(x,y)=C:C \text{ free}\}
$$ forms a 1-parameter family of curves. In above, $C$ free just means $C$ can be any value.
- We will call this $\phi(x,y)$ the **potential function** for this family of curves.
- For example, for $\phi(x,y) = x^{2 }+y^{2}$, $\{\phi(x,y)=C\}_{C \text{ free}}$ is a family of circles. By changing the parameter $C$, we get different circles.
- Or, when $\phi(x,y) = x^{2}+y$, $\phi(x,y) = C$ is a family of parabolas.
- Or, when $\phi(x,y)=xy$, $\phi(x,y) = C$ is a a family of hyperbolas.
- Try: $x-y+\sin(x+y)=C$, $x-y+\sin(xy)=C$, $x\sin(x+y)=C$.
## Slope fields.
- Using the methods we have developed, we observe that a first-order ODE tend to have 1-parameter family of solutions. This is "morally true", as in, a rule of thumb: That a $k$-th order ODE would have a $k$-parameter family of solutions. Why do we expect this?
- Why do we get these solutions like this? If we have $y'=f(x,y)$, we see that $f(x,y)$ is describing the slope of $y$. So we can plot a segment at $(x,y)$ with a line segment whose slope is $f(x,y)$
- Example. $y'=3$. Here $f(x,y)=3$, so we plot a segment of slope 3 everywhere.
- Example. $y'=y$. Here $f(x,y)=3$, so we plot a steeper slope as $y$ increases.
- And we see that solution curves all follow the slope field!
- The differential equation $y'=y$ has a 1-parameter family of solutions of the form $y=Ce^{x}$, so we can describe as $y / e^{x} = C$, for $\phi(x,y) = y / e^{x}$.
- The differential equation $y'=xy+y$ has solutions that can be described in the form $\phi(x,y) = C$. Let us solve $y'=(x+1)y$ is both linear and separable. So $\frac{dy}{y} = (x+1)dx$ gives $\ln|y|=\frac{x^{2}}{2}+x+C$, so $|y| = C e^{x^{2}/2+x}$, and $y=C e^{x^{2}/2+x}$. So we can write the 1-parameter family of solutions in the form $$
\frac{y}{e^{x^{2}/2+x}} = C
$$
- The differential equation $y'=y+\sin(x)$, write a 1-parameter family of solutions in the form $\phi(x,y) = C$. This is linear so $P(x) = -1$ and $Q(x) = \sin(x)$. So for $\mu(x) = e^{\int-1dx} = e^{-x}$ and $y(x) = e^{x}[\int Q(x)dx + C]= e^{x} [\int e^{-x} \sin(x)dx + C]$. Now we work out this integral $\int e^{-x} \sin(x) dx = \int \sin(x) d(-e^{-x})$ $=-e^{-x}\sin(x)+\int e^{-x} \cos(x)dx$ $=-e^{-x} \sin(x) +\int \cos(x) d(-e^{-x})$ $=-e^{-x}\sin(x) -e^{-x}\cos(x) - \int e^{-x}\sin(x)dx$. So $\int e^{-x} \sin(x)dx =\frac{-e^{-x}}{2}(\cos(x)+\sin(x))+C$. So the solutions are $y=\frac{-1}{2}(\cos(x)+\sin(x)) + C e^{x}$. Which we can express it as $$
\frac{y+\frac{1}{2}(\cos(x)+\sin(x))}{e^{x}} = C
$$
- We can now ask two **questions**: Given a 1-parameter family of curves of the form $\phi(x,y)=C$, can we write down a first-order differential equation whose solutions is this family? (Aka find a slope field whose solutions are these curves?) And how do we go back? An easy way to link them together is to use gadgets called differential forms.
- Note that there is a relation between a differential equation (calculus/analysis), and a family of curves as solutions (geometry). There is a third piece that plays into this story called differential forms (algebra).
## Differential forms.
- Things that look like $\mathrm{d}x,\mathrm{d}y$...these are called **differential form**. We will treat $\mathrm{d}(..)$ as a mathematical object with algebraic properties, and $d$ itself as an operation. The purpose of these differential forms is to be **integrated** or be expressed as **derivatives** later.
- If $f=f(x)$ is a one-variable scalar function, define $\mathrm{d}f=f'(x)\mathrm{d}x$. This means we can write $\int \mathrm{d}f = \int f'(x) \mathrm{d}x$, and we have $f=\int f'(x)\mathrm{d}x + C$, for some $C$.
- For any 2-varariable scalar function $f(x,y)$, we **define** the (exterior) derivative of $f$ to be $$
\mathrm{d}f=f_{x} \mathrm{d}x + f_{y}\mathrm{d}y
$$
- Example. If $f = x^{2}+y^{2}$, then $\mathrm{d}f = 2x \mathrm{d}x+2y \mathrm{d}y$.
- Example. If $f=\ln(x+y)$, then $\mathrm{d}f = \frac{\mathrm{d}x+\mathrm{d}y}{x+y}$. We can perform algebra and this suggests $(x+y)\mathrm{d}f=\mathrm{d}x + \mathrm{d}y$.
- Example. If $f=\arctan\left( \frac{x}{y} \right)$, then $df=\frac{dx / y - x / y^{2} dy}{1+x^{2} / y^{2}}= \frac{ydx-xdy}{x^{2}+y^{2}}$.
- Example. If $f=\sqrt{x^{2}+y^{2}}$, then $df = \frac{x dx+ydy}{\sqrt{x^{2}+y^{2}}}$.
- Example. If $f=C$ a constant, then $df = 0$.
- We can manipulate these objects algebraically.
- Think of $d(..)$ as a vector (technically covector), and $(...)d(...)$ like a scalar times a (co)vector, which is itself a (co)vector. This will inform you what you can do, and not to do.
- **Why do we care? We can express 1st order differential equations in differential forms.**
- A (first order) differential equation can be recast in these differential forms that looks like $Mdx+Ndy =0$.
- Example. $y'=y$, $dy=ydx$, so $dy-ydx=0$.
- Example. $y'=y+\sin(x)$ is just $dy-(y+\sin(x))dx = 0$.
- **So what? Well we can find differential equations with a 1-parameter family of curves as solutoin.**
- So! If $\phi(x,y)=C$ represents a family of curves, then $$
d\phi = \phi_{x} dx +\phi_{y} dy = 0
$$and this describes a differential equation! Specifically $\frac{dy}{dx} = - \frac{\phi_{x}}{\phi_{y}}$, or $y'=f(x,y)=-\frac{\phi_{x}}{\phi_{y}}$, the slope field. The advantage of the differential form expression is that it treats the variables in **equal footing**.
- Example. Write down a differential equation in differential form, and also more usual form for $y=y(x)$, whose solutions are the 1-parameter family of circles $\phi(x,y)=x^{2}+y^{2}=C$.
- We have $2xdx+2ydy=0$, or $y'=- \frac{x}{y}$. If we plot the slope field of this, we see they fit the circles!
- Example. What is a differential equation of the family of hyperbolas $xy=C$?
- Well $y dx + x dy =0$, so $y'=\frac{dy}{dx}=-\frac{y}{x}$
- Summary. If we have a family of curves $\phi(x,y)=C$, then $d\phi=0$ gives a differential equation that admits $\phi(x,y)=C$ as a 1-parameter family of solutions. This is pretty straightforward.
## Exact equations.
- **So what? Now how do we actually do what we want: Solving differential equations?**
- Now we will go backwards again.
- Given a differential equation $M\mathrm{d}x + N\mathrm{d}y = 0$, **if** we can find some potential function $\phi(x,y)$ such that $d\phi = Mdx + Ndy$, then the solutions are just $\phi(x,y) = C$! In this situation, the differential equation is called **exact equation**, and the differential form $Mdx+Ndy$ is called **exact differential form**.
- For this to happen, we must have $\phi_{x}=M$ and $\phi_{y}=N$.
- For example. $2x dx+y^{2}dy$ is exact. Because $d(x^{2}+\frac{1}{3}y^{3})=2x dx + y^{2} dy$. This means the solutions to $2xdx+y^{2}dy=0$ is the family $x^{2}+\frac{1}{3}y^{3}=C$. **PLOT IT**
- But how do we if our differential equation is exact, and if exact, how do we find $\phi$?
- **Theorem. Exact Criterion.** Suppose $M(x,y)$ and $N(x,y)$ are both continuous with continuous partial derivatives, defined on some open rectangle $R$. Then a necessary and sufficient condition for $Mdx+Ndy$ to be exact is $M_{y}= N_{x}$. (This means if and only if).
- Proof of $Mdx+Ndy$ is exact implies $M_{y}=N_{x}$. If $M dx+Ndy$ is exact, then there exists some $\phi$ such that that $d\phi = Mdx + Ndy$, for all $x,y \in R$. This means $\phi_{x} =M$ and $\phi_{y}=N$. Now by **Clairaut's theorem** (Math 11), if the mixed partials are all continuous, then we can interchange the order of differentiation. So $$
M_{y}=\phi_{xy}=\phi_{yx}=N_{x}. \blacksquare
$$
- For the other direction, if $M_{y}=N_{x}$, then we need to construct a suitable potential function $\phi$. We will do so constructively by calculating what $\phi$ should be when this holds. (The hard part however, is knowing that this is a guarantee, that such potential function will always exists, when the criterion is met)
- Example. $2xy dx + (x^{2}+5)dy=0$. Solve this differential equation.
- First check exact. Then we know a potential function $\phi$ is such that $\phi_{x}=M$ and $\phi_{x} =N$.
- $\phi_{x}=2xy$ implies $\phi=x^{2}y+C(y)$, $\phi_{y}=x^{2}+C'(y)=x^{2}+5$, implies $C'(y)=5$. So $C(y)=5y+K$. Hence $\phi=x^{2}+5y+K$.
- This gives solutions $\phi=C$, so $x^{2}+5y = C$ is a 1-parameter family of solutions.
- Example. $(x^{2}+\sin(y)) dx + x\cos(y) dy=0$.
- $\frac{x^{3}}{3}+x\sin(y)=C$
- Example. $(x^{2}-y^{2})dx + (y^{2}-2xy)dy =0$.
## What if not exact?
- Consider an integrating factor $\mu(x,y)$ so that $\mu Mdx + \mu Ndy=0$ is exact!
- Challenging, hard to know what $\mu$ needs to be. Need to guess $\mu$.
- Guess $\mu=\mu(x)$, $\mu=\mu(y)$, $\mu=x^{n}y^{m}$.
- Or by staring at it: $dx+ \frac{y}{x}dy=0$. This is not exact. But if we multiply by $x$, then we get $x dx+y dy = 0$, which is now exact.
- Example. $ydx +(x^{2}y-x)dy=0$. Guess $\mu=\mu(x)$.
- $\frac{\mu'}{\mu}= \frac{M_{y}-N_{x}}{N}$. This works if the right hand side is a function purely in $x$.
- Since $\frac{M_{y}-N_{x}}{N}=\frac{1-2xy+1}{x^{2}y-x}= \frac{2(1-xy)}{-x(1-xy)}=\frac{-2}{x}$
- So $\mu' /\mu = -2 / x$, so $\ln|\mu| = -2 \ln|x|+C$
- In this case $\mu = \frac{1}{x^{2}}$.
- Now we multiply this integrating factor $\mu$ across the original DE, we know it gives an exact DE: $\frac{y}{x^{2}}dx + (y-\frac{1}{x}) dy = 0$. We know there exists potential function $\phi(x,y)$ such that $\phi_x = \frac{y}{x^{2}}$ and $\phi_{y}= y-\frac{1}{x}$. Integrating $\phi_{x}$ with respect to $x$ we have $\phi(x,y) = -\frac{y}{x} + C(y)$. Differentiating by $y$ we see that $\phi_{y} = -\frac{1}{x}+C'(y) = y- \frac{1}{x}$. This shows $C'(y) = y$. And integrating gives $C(y) = \frac{y^{2}}{2}+K$.
- Putting all together, we get $\phi(x,y) = -\frac{y}{x}+\frac{y^{2}}{2}+K$. So the solutions are $$
-\frac{y}{x}+\frac{y^{2}}{2}= C
$$for some parameter $C$.